<!doctype html>
<title>fieldset generated content</title>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<style>
fieldset { display: inline-block; }
#test::before, #test::after { content:"X"; }
</style>
<fieldset id=test><legend>A</legend>Y</fieldset>
<fieldset id=ref><legend>A</legend>XYX</fieldset>
<script>
test(() => {
  const testElm = document.querySelector('#test');
  const refElm = document.querySelector('#ref');
  assert_equals(testElm.clientWidth, refElm.clientWidth, 'clientWidth');
  assert_equals(testElm.clientHeight, refElm.clientHeight, 'clientHeight');
});
</script>
